package com.rzdata.poct.system.domain.business.bo;

import com.rzdata.poct.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.*;
import java.util.Date;

/**
 * 【请填写功能名称】业务对象 poct_material
 *
 * @author ruoyi
 * @date 2021-09-09
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("【请填写功能名称】业务对象")
public class PoctMaterialBo extends BaseEntity {

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 耗材编号
     */
    @ApiModelProperty(value = "耗材编号")
    private String materialId;

    /**
     * 耗材名称
     */
    @ApiModelProperty(value = "耗材名称")
    private String materialName;

    /**
     * 耗材类型
     */
    @ApiModelProperty(value = "耗材类型")
    private Long type;

    /**
     * 适应样本
     */
    @ApiModelProperty(value = "适应样本")
    private String model;

    /**
     * 项目Id
     */
    @ApiModelProperty(value = "项目Id")
    private String projectId;

    /**
     * 项目名称
     */
    @ApiModelProperty(value = "项目名称")
    private String projectName;

    /**
     * 包装
     */
    @ApiModelProperty(value = "包装")
    private String packAge;

    /**
     * 存储温度
     */
    @ApiModelProperty(value = "存储温度")
    private String temperature;

    /**
     * 生产厂家
     */
    @ApiModelProperty(value = "生产厂家")
    private String manufacturer;

    /**
     * 配套仪器
     */
    @ApiModelProperty(value = "配套仪器")
    private String instrumentId;


    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private Long status;


    /**
     * 库存预警值
     */
    @ApiModelProperty(value = "库存预警值")
    private Long inventory;


    /**
     * 单位
     */
    @ApiModelProperty(value = "单位")
    private String unit;


    /**
     * 部门ID
     */
    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    /**
     * 生产日期
     */
    @ApiModelProperty(value = "生产日期")
    private Date manufacturingDate;

    /**
     * 保质期
     */
    @ApiModelProperty(value = "保质期")
    private Long shelflife;


    /**
     * 分页大小
     */
    @ApiModelProperty("分页大小")
    private Integer pageSize;

    /**
     * 当前页数
     */
    @ApiModelProperty("当前页数")
    private Integer pageNum;

    /**
     * 排序列
     */
    @ApiModelProperty("排序列")
    private String orderByColumn;

    /**
     * 排序的方向desc或者asc
     */
    @ApiModelProperty(value = "排序的方向", example = "asc,desc")
    private String isAsc;

    @Override
    public PoctMaterialBo clone() throws CloneNotSupportedException {
        PoctMaterialBo copy=null;
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(this);
            //将流序列化成对象
            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
            ObjectInputStream ois = new ObjectInputStream(bais);
            copy = (PoctMaterialBo) ois.readObject();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        return copy;
    }
}
